#include "bga/graphics/SceneNodeListener.h"
#include "bga/graphics/SceneNode.h"
#include <iostream>

using namespace std;

namespace bga
{


void SceneNodeListener::nodeAdded(const NodeEvent& nodeEvent)
{
    const SceneNode* sceneNode = static_cast<const SceneNode*>(nodeEvent.getSender());
    const_cast<SceneNode*>(sceneNode)->update();
}

void SceneNodeListener::nodeRemoved(const NodeEvent& nodeEvent)
{

}

void SceneNodeListener::nodeModified(const NodeEvent& nodeEvent)
{
    const SceneNode* sceneNode = static_cast<const SceneNode*>(nodeEvent.getSender());
    const_cast<SceneNode*>(sceneNode)->update();
}

void SceneNodeListener::nodeProcessed(const NodeEvent& nodeEvent)
{
    //const SceneNode* sceneNode = static_cast<const SceneNode*>(nodeEvent.getSender());

    // update uniform here or another things

}

}
